// -*- C++ -*-
// Copyright (C) Dmitry Igrishin
// For conditions of distribution and use, see files LICENSE.txt or pgfe.hpp

#ifndef DMITIGR_PGFE_DEFAULTS_HPP
#define DMITIGR_PGFE_DEFAULTS_HPP

// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// This file was generated automatically. Edit defaults.hpp.in instead!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

#include "dmitigr/pgfe/basics.hpp"
#include <dmitigr/misc/filesystem.hpp>

#include <chrono>
#include <cstdint>
#include <optional>
#include <string>

/// Defaults which are sets at build time.
namespace dmitigr::pgfe::detail::defaults {

constexpr const Communication_mode communication_mode{Communication_mode::@DMITIGR_PGFE_CONNECTION_COMMUNICATION_MODE@};

constexpr const std::optional<std::chrono::milliseconds> connect_timeout{@DMITIGR_PGFE_CONNECTION_CONNECT_TIMEOUT@};
constexpr const std::optional<std::chrono::milliseconds> wait_response_timeout{@DMITIGR_PGFE_CONNECTION_WAIT_RESPONSE_TIMEOUT@};

#ifndef _WIN32
const std::filesystem::path      uds_directory{"@DMITIGR_PGFE_CONNECTION_UDS_DIRECTORY@"};
const std::optional<std::string> uds_require_server_process_username{@DMITIGR_PGFE_CONNECTION_UDS_REQUIRE_SERVER_PROCESS_USERNAME_CPP@};
#endif

constexpr const bool                                tcp_keepalives_enabled{@DMITIGR_PGFE_CONNECTION_TCP_KEEPALIVES_ENABLED_CPP@};
constexpr const std::optional<std::chrono::seconds> tcp_keepalives_idle{@DMITIGR_PGFE_CONNECTION_TCP_KEEPALIVES_IDLE@};
constexpr const std::optional<std::chrono::seconds> tcp_keepalives_interval{@DMITIGR_PGFE_CONNECTION_TCP_KEEPALIVES_INTERVAL@};
constexpr const std::optional<int>                  tcp_keepalives_count{@DMITIGR_PGFE_CONNECTION_TCP_KEEPALIVES_COUNT@};

const std::optional<std::string>  net_address{@DMITIGR_PGFE_CONNECTION_NET_ADDRESS_CPP@};
const std::optional<std::string>  net_hostname{@DMITIGR_PGFE_CONNECTION_NET_HOSTNAME_CPP@};
constexpr const std::int_fast32_t port{@DMITIGR_PGFE_CONNECTION_PORT@};

const std::string                username{@DMITIGR_PGFE_CONNECTION_USERNAME_CPP@};
const std::string                database{@DMITIGR_PGFE_CONNECTION_DATABASE_CPP@};
const std::optional<std::string> password{@DMITIGR_PGFE_CONNECTION_PASSWORD_CPP@};
const std::optional<std::string> kerberos_service_name{@DMITIGR_PGFE_CONNECTION_KERBEROS_SERVICE_NAME_CPP@};

constexpr const bool ssl_enabled{@DMITIGR_PGFE_CONNECTION_SSL_ENABLED_CPP@};
constexpr const bool ssl_server_hostname_verification_enabled{@DMITIGR_PGFE_CONNECTION_SSL_SERVER_HOSTNAME_VERIFICATION_ENABLED_CPP@};
constexpr const bool ssl_compression_enabled{@DMITIGR_PGFE_CONNECTION_SSL_COMPRESSION_ENABLED_CPP@};
const std::optional<std::filesystem::path> ssl_certificate_file{@DMITIGR_PGFE_CONNECTION_SSL_CERTIFICATE_FILE_CPP@};
const std::optional<std::filesystem::path> ssl_private_key_file{@DMITIGR_PGFE_CONNECTION_SSL_PRIVATE_KEY_FILE_CPP@};
const std::optional<std::filesystem::path> ssl_certificate_authority_file{@DMITIGR_PGFE_CONNECTION_SSL_CERTIFICATE_AUTHORITY_FILE_CPP@};
const std::optional<std::filesystem::path> ssl_certificate_revocation_list_file{@DMITIGR_PGFE_CONNECTION_SSL_CERTIFICATE_REVOCATION_LIST_FILE_CPP@};

} // namespace dmitigr::pgfe::detail::defaults

#endif // DMITIGR_PGFE_DEFAULTS_HPP
